package com.yyt2021.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yyt2021.entity.Demo;
import com.yyt2021.service.DemoService;

@Controller
@RequestMapping("/demo")
public class DemoController {

	@Autowired
	DemoService demoService;
	
	@RequestMapping("/get")
	@ResponseBody
	public Demo get(Long id) {
		return demoService.selectById(id);
	}
}
